package com.orchid.community.common.utils;

public enum CodeEnum {

    //code规则：第一位：1表示网页接口，2表示小程序端接口, 3表示管理端接口；第二位和第三位：表示功能模块；第四位和第5位：表示错误编号
    //全局code
    SUCCESS(200000, "成功"),
    EXPORT_ERROR(300001,"导出错误"),
    PARAM_ERROR(100001, "参数不全"),
    DEL_FAIL(30014,"删除失败"),
    EDIT_FAIL(300011,"编辑失败"),
    ADD_FAIL(300012,"新增失败"),
    ACCOUNT_REPEAT(300202, "账号名称已存在"),
    SERVICE_ERROR(500002, "系统错误"),
    DATA_ERROR(300002,"数据错误");

    CodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    private Integer code;

    private String message;


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
